# author: axin
# date: 2021/4/23 15:04
# description:

from rest_framework import serializers
from django.contrib.auth.models import Permission, ContentType


class PermissionsSerializers(serializers.ModelSerializer):
    """
        权限序列化器
    """

    class Meta:
        model = Permission
        fields = "__all__"


class ContentTypeSerializers(serializers.ModelSerializer):
    """
        权限类型序列化器
    """
    name = serializers.CharField(read_only=True)

    class Meta:
        model = ContentType
        fields = "__all__"
